<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

</head>
<body>
    <input class="uphone" type="text" placeholder="phone">
    <input class="password" type="password" placeholder="password">
    <button id="btn">click</button>
    <div id="box"></div>
</body>
<script src="assets/js/jquery.js"></script>
<script>
    $('#btn').click(function () { 
        var uphone = $('.uphone').val();
        var pass = $('.password').val();
        console.log('object', uphone,pass);
        $.ajax({
            type: 'get',
            // dataType: 'jsonp',
            // jsonp: 'callback',
            // headers: 'Access-Control-Allow-Origin',
            url: 'http://localhost/dancer/public/json/test/login',
            data: {
                uphone: 
            },
            async: false,
            success: function (data) { 
                console.log('data', data);
                $('#box').append(data);
             }
        })

    })
</script>
</html>